project(catgets)

cmake_minimum_required(VERSION 2.4 FATAL_ERROR)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

if(X86)

else(X86)

# 设置CMake查找的根目录
set(CMAKE_FIND_ROOT_PATH "/home/jake/bin/sysroots/i686-linux/usr/")
# 设置不查找工具程序的位置
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# 设置只在CMAKE_FIND_ROOT_PATH设定目录下查找库文件
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# 设置只在CMAKE_FIND_ROOT_PATH设定目录下查找头文件
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# 设置C语言编译器
SET(CMAKE_C_COMPILER "/home/jake/bin/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-gcc")
set(CMAKE_CXX_COMPILER "/home/jake/bin/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++")

# 向C/C++编译选项添加宏定义
endif(X86)

add_compile_options(-g)
